# open()拷贝图片

filePath = 'D:\\hxy\\uploadPath\\abc.png'
#拷贝filePath路径生成图片
copyPath = 'D:\\hxy\\uploadPath\\abc_copy.png'

file1 = open(filePath, 'rb')
copyFile1 = open(copyPath, 'wb')
#将file1写到copyFile1
copyFile1.write(file1.read())
copyFile1.close()
file1.close()